<?php 

/* Vanilla Journal
 * vj.viewcat.php
 * Weizhong Yang
 */

   $catview = new catview($_GET['cat'], $_GET['year'], $_GET['page']);
   $catview->error();
   vj_header();
   $catview->msg();
   $catview->load_posts();
   $posts = $catview->catview_posts;
   if($posts) {
      $catview->title("<p>", "</p>");
      foreach($posts as $post) {
	 $id = $post['ID'];
	 $post = new post($id);
	 vj_post_cat();
      } 
   }
   vj_post_cat_menu(); 
   vj_footer();
?>
